const createProxyMiddleware = require("http-proxy-middleware");

module.exports = function (app) {
  app.use(
    "/student",
    createProxyMiddleware({
      target: "http://localhost:5000",
      changeOrigin: true,
      pathRewrite: {
        "^/student": "",
      },
    })
  );

  app.use(
    "/person",
    createProxyMiddleware({
      target: "http://localhost:6000",
      changeOrigin: true,
      pathRewrite: {
        "^/person": "",
      },
    })
  );
};
